#define  _SHELL_EVE_GLOBAL_
#include "config.h"

void shellEve(U32 *pShellEncode)
{
	U8 *pUID;
	U8 i;


	for (i = 0;i < 4;i++)
	{
		pShellEncode[i] = 0;
	}

	printf("\r\n im shellEve Read");

	pUID = (U8 *)U_ID_ADD;
	for (i = 0;i < U_ID_LEN;i++)
	{
		pShellEncode[i%4] <<= 8;
		pShellEncode[i%4] += *pUID;
		pUID++;
	}

	printf("\r\n im shellEve Calc");

	for (i = 0;i < 4;i++)
	{
		if (i)
		{
			pShellEncode[i] = (pShellEncode[i]+pShellEncode[i-1] + 20180529)*84236066;
		}
		else
		{
			pShellEncode[i] = (pShellEncode[i]+pShellEncode[3] + 20180529)*84236066;
		}
	}

	printf("\r\n im shellEve Write");
}

